// pages/index/business/member/index.js
// import { hotyqList } from "../../../../utils/data/tabbar";
import { getUMlistpage } from  "../../../../utils/api/module/cylm";
Page({
    data: {
        hotyqList: [],
        page: 1,
        isLineData: 0
    },
    onLoad: function (options) {
        this.getData();
    },
    getData: function() {
        getUMlistpage({
            limit: 10,
            page: this.data.page
        }).then(res => {
            let data = res.data.data.rows;
            this.setData({
                ['hotyqList[' + (this.data.page - 1) + ']']: data,
                isLineData: data.length < 10 && this.data.page != 1 ? 2 : 0
            })
        })
    },
    onReachBottom: function() {
        if(this.data.hotyqList[(this.data.page - 1)].length < 10) {
            this.setData({ isLineData: 2 });
            return false;
        };
        this.setData({ isLineData: 1 });
        this.data.page += 1;
        this.getData();
    }
})